Special math alphabets

But simple formulas with one alphabet and a huge number of symbols are not sufficient for mathematicians to expose their thoughts properly. They tend to use every available typeface to denote special things.

To cope with this need for special alphabets in formulas,' we introduce the concept of 〈math alphabet identifiers〉. These constructs are special commands which switch to a specific typeface. They might correspond to different typefaces in different math versions but within one version they always select the same typeface regardless of surrounding conditions.

A 〈math alphabet identifier〉 can be defined according to the users' needs but standard LATEX already has a few of them built in. They are described in table [*].

Table: Predefined 〈math alphabet identifiers〉 in LATEX
\begin{table*}\leftskip25pt \rightskip\leftskip
\LaTeX {} knows about three $\l...
...and finally
\verb=\mit= selects the default math italic alphabet.\end{table*}


When using such an 〈alphabet identifier〉 two syntax variants are available: one can understand a command like \cal as a switch to a different font, i.e. using a syntax {\cal ...} as the old LATEX does, but we prefer to view the 〈math alphabet identifier〉 as a command with one argument, i.e. to use a syntax of the form ..\cal{A}.. To select the first alternative a style option `nomargid' is provided. This option is automatically selected if the `oldlfont' option is used since this option is supposed to produce identical results for older documents.

New 〈math alphabet identifiers〉 are defined in two steps. First the identifier is made known to the system with the \newmathalphabet command. Then specific typefaces in some or all 〈math versions〉 are assigned by means of the \addtoversion command.

Let us discuss this process in detail. Suppose that you want to make a sans serif typeface available as a math alphabet. First we choose a new command name (e.g. \sfmath) and tell LATEX about it with the line

 \newmathalphabet{\sfmath}
Then we consult table [*] to find suitable fonts to assign to this alphabet identifier. As you find out, the computer modern sans serif family consists of three series, a medium, semi bold condensed and a bold extended one. The medium and the bold extended series both contain a normal shape typeface. So we add the line:
 \addtoversion{normal}{\sfmath}{cmss}{m}{n}
 \addtoversion{bold}{\sfmath}{cmss}{bx}{n}
Now our alphabet identifier is ready for use in these two versions. We demonstrate this with the formula `="7030 `="7031 `="7032 `="7033 `="7034 `="7035 `="7036 `="7037 `="7038 `="7039 &sum#sum;="1350

$\displaystyle \sum$$\displaystyle \sfmath$Ai = tanα

which was produced by
\mathversion{normal}
\[  \sum \sfmath{A}_{i} = \tan \alpha \]
Note that we first switched back to the normal version. This was necessary since this article is typeset with a third version (Euler) in force. If we had tried to use \sfmath in this version we would have gotten an error message stating that this 〈math alphabet identifier〉 isn't defined for the Euler version.8

If we are interested in a slanted shape we have to face a problem: there is no slanted shape in the bold extended series of the Computer Modern sans serif family. So, if we make the identifier known only in the normal version then it would produce an error message when encountered in the bold (or any other) version. Of course we can get by using always the same typeface in all versions. To make this task a bit easier there is also a * variant of the \newmathalphabet command which takes three more arguments: the default values for family, series and shape for all math versions in which the alphabet identifier is not explicitly defined via an \addtoversion command. So our second example can be set up simply by stating

 \newmathalphabet*{\sfslmath}{cmss}{m}{sl}
This would have the additional advantage that this math alphabet identifier is also allowed in math versions which are defined in style files or document styles (like the Euler version mentioned earlier). Any explicit \addtoversion command overwrites the defaults given by \newmathalphabet*; so, it might be a good idea always to specify default values.

Here we show the same formula as above, but this time in the Euler version and with \sfslmath instead of \sfmath:

$\displaystyle \sum$$\displaystyle \sfslmath$Ai = tanα